package com.buyingtickets.service;

import com.buyingtickets.entity.QueryParameter;
import com.buyingtickets.entity.UnitInterval;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UnitIntervalBiz {
    public List<UnitInterval> queryByQueryUnitInterval(QueryParameter qp);//分页查询订单

    public int queryCountQueryUnitInterval(QueryParameter qp);//分页查询订单

    public UnitInterval queryByID(int id);//根据订单ID查找

    public int update(UnitInterval unitInterval);//根据订单ID修改

    public int delete(int id);//根据订单ID删除

    public int add(UnitInterval unitInterval);//添加

    /**
     * 查询所有单元区间
     *
     * @return
     */
    List<UnitInterval> queryAll();

    /**
     * 起始站终点站查询经停站
     *
     * @param startid 起始站
     * @param endid   终点站
     * @return
     */
    List<UnitInterval> queryByStartAndEnd(int startid, int endid);

    /**
     * 添加单元区间站点
     * @param startid
     * @param end
     * @param mileage
     * @param travelTime
     * @return
     */
    boolean addUnitInterval(@Param("startid")int startid,@Param("endid")int end,
    @Param("mileage")int mileage,@Param("travelTime")String travelTime);
}
